package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.ItemDetailMapper;
import com.whq.entity.ItemDetail;
import com.whq.service.ItemDetailService;

@Service(value = "tdItemDetailService")
public class ItemDetailServiceImpl implements ItemDetailService {

    @Autowired
    private ItemDetailMapper<ItemDetail>tdItemDetailMapper;
    
    @Override
    public Integer insertSelective(ItemDetail tdItemDetail) throws Exception {
           return this.tdItemDetailMapper.insertSelective(tdItemDetail);
        }

    @Override
    public Integer insertBatch(List<ItemDetail> tdItemDetail) throws Exception {
           return this.tdItemDetailMapper.insertBatch(tdItemDetail) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdItemDetailMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdItemDetailMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(ItemDetail tdItemDetail) {
           return this.tdItemDetailMapper.updateByPrimaryKeySelective(tdItemDetail);
    }

    @Override
    public ItemDetail findById(Object id) {
           return (ItemDetail) this.tdItemDetailMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<ItemDetail> selectByCondition(ItemDetail tdItemDetail) {
           return (List<ItemDetail>) this.tdItemDetailMapper.selectByCondition(tdItemDetail);
    }

    @Override
    public Integer selectCountByCondition(ItemDetail tdItemDetail) {
           return  this.tdItemDetailMapper.selectCountByCondition(tdItemDetail);
    }

}
